package org.example.service.impl;

import org.example.domain.Menu;
import org.example.domain.MenuVO;

import org.example.mapper.MenuMapper;
import org.example.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import java.util.List;

@Service
public class MenuServiceImpl implements MenuService {

    @Autowired
    MenuMapper menuMapper;

    @Override
    public List<Menu> selectAll(MenuVO menuVO) {
        return menuMapper.selectAll(menuVO);
    }

    @Override
    public List<Menu> selectAllDao() {
        return menuMapper.selectAllDao();
    }

    @Override
    public Menu selectByMenu(Integer id) {
        return menuMapper.selectByMenu(id);
    }

    @Override
    public Integer selectByNmae(String menuName) {
        return menuMapper.selectByNmea(menuName);
    }

    @Override
    public Integer selectById(Integer id) {
        return menuMapper.selectById(id);
    }

    @Override
    public void deleteById(Integer id) {
        menuMapper.deleteById(id);
    }

    @Override
    public void deleteByIdTwo(Integer id) {
        menuMapper.deleteByIdTwo(id);
    }

    @Override
    public Integer[] selectByParentId(Integer id) {
        return menuMapper.selectByParentId(id);
    }

    @Override
    public void insertMenu(Menu menu) {
        menuMapper.insertMenu(menu);
    }

    @Override
    public void updateMenu(Menu menu) {
        menuMapper.updateMenu(menu);
    }


}
